package cn.com.shopec.erp.product.service;

import java.util.List;

import cn.com.shopec.erp.common.page.PageFinder;
import cn.com.shopec.erp.common.page.PageQuery;
import cn.com.shopec.erp.product.entity.Commodity;
import cn.com.shopec.erp.product.entity.Product;
import cn.com.shopec.erp.product.vo.CommodityVo;
import cn.com.shopec.erp.product.vo.ProdSupplierVo;
import cn.com.shopec.erp.product.vo.ProductVo1;
import cn.com.shopec.erp.stock.entity.ProductBarCode;

/**
 * 
 * @ClassName: ICommodityService
 * @Description: 商品服务层接口
 * @author: duhui
 * @date 2013-5-29 下午04:39:36
 * 
 */
public interface ICommodityService {
    /**
     * 
     * @Title: addCommodity
     * @Description: 添加商品和货品信息
     * @param commodity
     * @throws
     * @author: duhui
     * @date: 2013-5-29下午04:42:54
     */
    public void addCommoProdInfo(CommodityVo commodityVo, String productString) throws Exception;

    /**
     * 
     * @Title: updateCommodity
     * @Description: 修改商品和货品信息
     * @param commodityVo
     * @throws Exception
     * @throws
     * @author: duhui
     * @date: 2013-5-29下午04:49:34
     */
    public String updateCommoProdInfo(CommodityVo commodityVo, String productString) throws Exception;

    /**
     * 
     * @Title: getCommodity
     * @Description: 查询某个商品信息
     * @param commo
     * @return
     * @throws
     * @author: duhui
     * @date: 2013-5-31下午03:29:29
     */
    public CommodityVo getCommodity(String commoNo);

    /**
     * 
     * @Title: getCommodity
     * @Description: 查询某个商品信息
     * @param commo
     * @return
     * @throws
     * @author: duhui
     * @date: 2013-5-31下午03:29:29
     */
    public Commodity getCommodityByCommoNo(String commoNo);

    /**
     * 
     * @Title: getProduct
     * @Description: 根据货品编号查询货品信息
     * @param prodNo
     * @return
     * @throws Exception
     * @throws
     * @author: duhui
     * @date: 2013-6-5上午10:15:52
     */
    public ProductVo1 getProduct(String prodNo) throws Exception;

    /**
     * 
     * @Title: getProduct
     * @Description: 根据货品编号查询货品信息
     * @param prodNo
     * @return
     * @throws Exception
     * @throws
     * @author: duhui
     * @date: 2013-6-5上午10:15:52
     */
    public Commodity getCommondityByProNo(String prodNo) throws Exception;

    /**
     * 
     * @Title: getProductList
     * @Description: 查询商品下对应的货品信息
     * @return
     * @throws
     * @author: duhui
     * @date: 2013-5-31下午03:39:46
     */
    public List<ProductVo1> getProductList(String commoNo);

    /**
     * 
     * @Title: addProdSupplier
     * @Description: TODO
     * @param prodNo
     *            货品编号
     * @param supplierList
     *            所有货品的供应商设置的json字符串
     * @throws
     * @author: duhui
     * @date: 2013-5-31下午05:34:29
     */
    public void addProdSupplier(String prodNo, String supplierList) throws Exception;

    /**
     * 分页查询CommodityVo1商品列表
     * 
     * @param vo1
     * @param pageQuery
     * @return
     */
    public PageFinder<CommodityVo> pageFinderCommodity(CommodityVo commodity1, PageQuery pageQuery)
            throws Exception;

    /**
     * 根据商品编码查询出该编码下未删除的所有货品
     * 
     * @param commoNo
     * @return
     */
    public List<Product> getAllProductByCommoNo(String commoNo);

    /**
     * 根据商品编码删除，已通过审核的商品不能删除
     * 
     * @param commonNo
     * @throws Exception
     */
    public void delCommodity(String commonNo) throws Exception;

    /**
     * @Title: updateCommodityByCheck
     * @Description: 审核商品
     * @param commoNo
     * @param checkState
     * @return 结果代码（1：成功，0：失败，-1：审核结果不正确，-2：找不到对应的商品记录）
     * @throws Exception
     * @throws
     */
    public int checkCommodity(String commoNo, int checkState) throws Exception;

    /**
     * 查询商品
     * 
     * @param commodityVo
     * @return gaoyaxiong 2013-6-6 19:25:20
     */
    List<CommodityVo> getCommodityList(CommodityVo commodityVo);

    /**
     * 
     * @Title: pagedCommodityByCheckState
     * @Description: 查询已审核的商品信息
     * @param commodity1
     * @param pageQuery
     * @return
     * @throws
     * @author: duhui
     * @date: 2013-6-18上午10:32:38
     */
    public PageFinder<Commodity> pagedCommodityByCheckState(Commodity commodity1, PageQuery pageQuery) throws Exception;

    /**
     * 
     * @Title: checkNoCommodity
     * @Description: 审核不通过的操作
     * @param commoNo
     * @param checkState
     * @param desc
     * @return
     * @throws
     * @author: duhui
     * @date: 2013-6-28上午11:24:16
     */
    public String checkNoCommodity(String commoNo, int checkState, String desc) throws Exception;
    
    
    /**
     * 
     * @Title: getCommodityDetail
     * @Description: 导出商品信息
     * @return List
     * @author: gaoyaxiong
     * @date: 2013-07-25 17:32:38
     */
	public List getCommodityDetail(CommodityVo commodityVo);
	
	/**
	 * 导入商品和货品信息
	 * @param stockProductId 
	 * @param productBarCode
	 * @param excelData
	 */
	String importProductBarCodes(List<List<Object>> excelData) throws Exception;
	
	/**
	 * 根據商品名称查询商品信息
	 * @param stockProductId 
	 * @param productBarCode
	 * @param excelData
	 */
	public Commodity getCommodityInfo(String commodName);
	
	 /**
     * 
     * @Title: addProdSupplier
     * @Description: TODO
     * @param prodNo
     *            货品编号
     * @param supplierList
     *            所有货品的供应商设置的json字符串
     * @throws
     * @author: duhui
     * @date: 2013-5-31下午05:34:29
     */
    public void addProdSupplierExcl(String prodNo, ProdSupplierVo supplierList) throws Exception;
	
	
	
}
